package com.xiyu.service.vo.elder.register.baseVO;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import jakarta.validation.constraints.*;
import org.hibernate.validator.constraints.*;
import jakarta.validation.constraints.NotEmpty;
import org.springframework.format.annotation.DateTimeFormat;
import static com.xiyu.service.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
import java.time.LocalDateTime;

/**
 * 来访登记 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 */
@Data
public class ElderVisitBase {

    @Schema(description = "老人ID")
    private Long elderId;

    @Schema(description = "来访者姓名")
    @Size(max = 50, message = "来访者姓名长度不能超过50")
    private String visitName;

    @Schema(description = "来访者手机")
    @Size(max = 50, message = "来访者手机长度不能超过50")
    private String visitMobile;

    @Schema(description = "与老人关系")
    @Size(max = 50, message = "与老人关系长度不能超过50")
    private String kinship;

    @Schema(description = "来访时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime visitTime;

    @Schema(description = "同行人数")
    @Range(max = 100000000, message = "同行人数最大不能超过100000000")
    private Integer visitCount;

    @Schema(description = "来访缘由")
    @Size(max = 1024, message = "来访缘由长度不能超过1024")
    private String visitReason;

    @Schema(description = "备注")
    @Size(max = 1024, message = "备注长度不能超过1024")
    private String remark;

    @Schema(description = "状态")
    @Range(max = 127, message = "状态最大不能超过127")
    private Integer status;

    @Schema(description = "离开时间")
    @Size(max = 50, message = "离开时间长度不能超过50")
    private String leaveTime;

    @Schema(description = "预约时间")
    @Size(max = 50, message = "预约时间长度不能超过50")
    private String reserveTime;

    @Schema(description = "是否预约")
    private Boolean isReserve;

}
